﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Printing;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace CheckPrinterState
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                for (; ; )
                {
                    PrintQueue pq = LocalPrintServer.GetDefaultPrintQueue();
                    PrintQueueStatus status = pq.QueueStatus;

                    Console.WriteLine(status.ToString());

                    Thread.Sleep(500);
                }
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
